<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>硬币</title>
</head>
<body>
  <script>
    function fn(n) {
      let map = new Array(n + 1).fill(1)
      let sum = [1, 5, 10, 15]
      for (let i = 1; i < 4; i++) {
        for (let j = 1; j <= n; j++) {
          if (j - sum[i] >= 0) {
            map[j] = (map[j] + map[j - sum[i]]) % 1000000
          }
        }
      }
      return map[n]
    }
    console.log(fn(5))
  </script>
</body>
</html>